package ictbk.ttmk51.grapro.app.safephonebook;

public class Email {
	private String address;
 	private int type;
 	
    public static final int TYPE_HOME = 1;
    public static final int TYPE_WORK=2;
    public static final int TYPE_OTHER = 3;
    public static final int UNKNOW = -1;
 	
    public Email(){}
    
 	public String getAddress() {
 		return address;
 	}
 	public void setAddress(String address) {
 		this.address = address;
 	}
 	public int getType() {
 		return type;
 	}
 	
 	public String getType(int type){
 		switch(type){
 		case TYPE_HOME:{
 			return "E-Mail Home";
 		}
 		case TYPE_WORK:{
 			return "E-Mail Work";
 		}
 		case TYPE_OTHER:{
 			return "E-Mail Other";
 		} 		
 		}
 		return "Unknow";
 	}
 	
 	public String getTypeName(){
 		switch(type){
 		case TYPE_HOME:{
 			return "E-Mail Home";
 		}
 		case TYPE_WORK:{
 			return "E-Mail Work";
 		}
 		case TYPE_OTHER:{
 			return "E-Mail Other";
 		} 		
 		}
 		return "Unknow";
 	}
 	
 	public void setType(int t) {
 		this.type = t;
 	}
 	
 	public Email(String a, int t) {
 		this.address = a;
 		this.type = t;
 	}


}
